package com.example.wechat114.service.impl;

import com.example.wechat114.commons.JsonBean;
import com.example.wechat114.entity.Hurl;
import com.example.wechat114.mapper.HurlMapper;
import com.example.wechat114.service.HurlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HurlServiceImpl implements HurlService {

    @Autowired
    private HurlMapper hurlMapper;

    //通过医院查询医院下所有接口
    @Override
    public JsonBean selectById(Integer id) {
        JsonBean jsonBean = new JsonBean(-1, "", null);
        if (hurlMapper.selectById(id)!=null){
            jsonBean = new JsonBean(0, "", hurlMapper.selectById(id));
        }
        return jsonBean;
    }
}
